<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/style.css"/>
</head>

<body>
<div id="container">
    <!---->

    <nav id="header" class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><b>BBS</b></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li id="tab_1">
                    <a href="<?php echo U('Article/index');?>"><b>首页</b></a>
                </li>
                <li id="tab_2">
                    <a href="<?php echo U('Sort/index');?>"><b>分类</b></a>
                </li>
                <li id="tab_3">
                    <a href="<?php echo U('User/index');?>"><b>会员</b></a>
                </li>
                <?php if($_SESSION['uid']!= null): ?><li id="tab_4">
                        <a href="<?php echo U('Article/add');?>"><b>发表</b></a>
                    </li><?php endif; ?>

            </ul>
            <form class="navbar-form navbar-left" role="search" action="<?php echo U('Index/search');?>" method="get">
                <div class="form-group">
                    <input type="text" class="form-control" name="keyword" placeholder="Search">
                </div>
            </form>
            <?php if($_SESSION['uid']== null): ?><ul class="nav navbar-nav navbar-right">
                    <li  id="tab_7">
                        <a href="<?php echo U('User/login');?>">
                            <b>登录</b>
                        </a>
                    </li>
                    <li id="tab_8">
                        <a href="<?php echo U('User/rigister');?>"><b>注册</b></a>
                    </li>
                </ul><?php endif; ?>
            <?php if($_SESSION['uid']!= null): ?><ul class="nav navbar-nav navbar-right">
                    <li id="tab_5">

                        <a href="<?php echo U('notice/index');?>">
                            <i class="icon-envelope"></i>
                            <span id="">1</span>
                        </a>
                    </li>
                    <li class="dropdown" id="tab_6">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <b><?php echo (session('uid')); ?></b>
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li>
                                <a href="<?php echo U('User/info');?>"><b>个人网页</b></a>
                            </li>
                            <li>
                                <a href="<?php echo U('Home/User/set');?>"><b>设置</b></a>
                            </li>
                            <?php if($_SESSION['uid']== root): ?><li>
                                    <a href="<?php echo U('Home/Admin/index');?>"><b>后台管理</b></a>
                                </li><?php endif; ?>
                            <li class="divider"></li>
                            <li>
                                <a href="<?php echo U('User/logout');?>"><b>退出</b></a>
                            </li>
                        </ul>
                    </li>
                </ul><?php endif; ?>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>

    <!---->

    <div id="main" class="container">
        <div class="row">
            <div class="col-md-2">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b>BBS后台</b></h3>
                    </div>
                    <div class="panel-body">
                        <div class="form-group tabbable">
                            <ul class=" nav nav-pills nav-stacked">
                                <li class="active">
                                    <a href="#panel-07" data-toggle="tab">主页</a>
                                </li>
                                <li class="">
                                    <a href="#panel-08" data-toggle="tab">用户</a>
                                </li>
                                <li>
                                    <a href="#panel-09" data-toggle="tab">帖子</a>
                                </li>
                                <li>
                                    <a href="#panel-10" data-toggle="tab">分类</a>
                                </li>
                            </ul>
                            <br/>

                        </div>

                    </div>
                </div>

            </div>

            <div class="col-md-10">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane" id="panel-07">
                                    主页介绍
                            </div>
                            <div class="tab-pane" id="panel-08">
                                    <div class="panel panel-default">
                                        <!-- Default panel contents -->
                                        <div class="panel-heading"><b>用户表</b></div>

                                        <!-- Table -->
                                        <table class="table table-bordered" border="" cellspacing="" cellpadding="">
                                            <thead>
                                            <tr class="success">
                                                <td>ID</td>
                                                <td>用户名</td>
                                                <td>邮箱</td>
                                                <td>类型</td>
                                                <td>操作</td>

                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php if(is_array($users)): foreach($users as $key=>$user): ?><tr>
                                                    <td><?php echo ($user['id']); ?></td>
                                                    <td><?php echo ($user['username']); ?></td>
                                                    <td><?php echo ($user['email']); ?></td>
                                                    <td><?php echo ($user['user_type']); ?></td>
                                                    <td>
                                                        <button class="btn btn-primary" data-toggle="modal"
                                                                data-target="#user_update<?php echo ($user['id']); ?>">更改
                                                        </button>
                                                        <!---->
                                                        <div class="modal fade" id="user_update<?php echo ($user['id']); ?>" tabindex="-1"
                                                             role="dialog" aria-labelledby="myModalLabel"
                                                             aria-hidden="true">
                                                            <div class="modal-dialog">
                                                                <div class="modal-content">
                                                                    <div class="modal-header">
                                                                        <button type="button" class="close"
                                                                                data-dismiss="modal"
                                                                                aria-hidden="true"></button>
                                                                        <h4 class="modal-title" >
                                                                            更改
                                                                        </h4>
                                                                    </div>
                                                                    <form action="<?php echo U('Admin/edit');?>" method="post">

                                                                        <div class="modal-body">
                                                                            <div class="panel-body">
                                                                                <input class="hidden" type="text" name="edit_type" value="user"/>
                                                                                <input class="hidden" type="text" name="id" value="<?php echo ($user['id']); ?>"/>
                                                                                <label class="control-label" for="user_type">类型</label>
                                                                                <select class="form-control" name="user_type" id="user_type">
                                                                                    <?php if($user['user_type'] == 'admin'): ?><option name="user_type1" value="user">user</option>
                                                                                        <option name="user_type2" selected="selected" value="admin">admin</option>
                                                                                    <?php else: ?>
                                                                                        <option name="user_type1" selected="selected" value="user">user</option>
                                                                                        <option name="user_type2" value="admin">admin</option><?php endif; ?>
                                                                                </select>
                                                                                <br/>
                                                                                <label class="control-label" for="email">邮箱</label>
                                                                                <input class="form-control" type="text" id="email"
                                                                                       name="email" value="<?php echo ($user['email']); ?>"/>
                                                                            </div>
                                                                        </div>
                                                                        <div class="modal-footer ">
                                                                            <center>
                                                                                <button type="submit"
                                                                                        class="btn btn-success">提交
                                                                                </button>
                                                                                <button type="button"
                                                                                        class="btn btn-default"
                                                                                        data-dismiss="modal">关闭
                                                                                </button>
                                                                            </center>

                                                                        </div>
                                                                    </form>
                                                                </div>
                                                                <!-- /.modal-content -->
                                                            </div>
                                                            <!-- /.modal -->
                                                        </div>
                                                        <!---->


                                                        <button class="btn btn-danger" data-toggle="modal"
                                                                data-target="#user_delete<?php echo ($user['id']); ?>">删除
                                                        </button>
                                                        <!---->
                                                        <div class="modal fade" id="user_delete<?php echo ($user['id']); ?>"
                                                             tabindex="-1"
                                                             role="dialog"
                                                             aria-labelledby="" aria-hidden="true">
                                                            <div class="modal-dialog modal-sm">
                                                                <div class="modal-content">
                                                                    <div class="modal-header">
                                                                        <button type="button" class="close"
                                                                                data-dismiss="modal"
                                                                                aria-hidden="true"></button>
                                                                        <h4 class="modal-title danger" >
                                                                            确认删除？
                                                                        </h4>
                                                                    </div>
                                                                    <form style="display: inline"
                                                                          action="<?php echo U('Admin/delete');?>"
                                                                          method="post">
                                                                        <div class="modal-body">
                                                                            <input type="hidden"
                                                                                   name="delete_type"
                                                                                   value="user"/>
                                                                            <input type="hidden"
                                                                                   name="id"
                                                                                   value="<?php echo ($user['id']); ?>"/>
                                                                            <center>
                                                                                <button type="submit"
                                                                                        class="btn btn-danger">删除
                                                                                </button>
                                                                                <button type="button"
                                                                                        class="btn btn-default"
                                                                                        data-dismiss="modal">取消
                                                                                </button>
                                                                            </center>
                                                                        </div>
                                                                    </form>
                                                                </div>
                                                                <!-- /.modal-content -->
                                                            </div>
                                                            <!-- /.modal -->
                                                        </div>

                                                    </td>
                                                </tr><?php endforeach; endif; ?>
                                            </tbody>
                                        </table>

                                    </div>
                                    <div class="pagination  pagination-centered">
                                        <ul class="pagination">
                                            <li>
                                                <a href="#">上一页</a>
                                            </li>
                                            <li>
                                                <a href="#">1</a>
                                            </li>
                                            <li>
                                                <a href="#">2</a>
                                            </li>
                                            <li>
                                                <a href="#">3</a>
                                            </li>
                                            <li>
                                                <a href="#">下一页</a>
                                            </li>
                                        </ul>
                                    </div>
                                    <div class="col-sm-12">
                                        <button class="btn btn-primary" data-toggle="modal"
                                                data-target="#user_add">增加
                                        </button>
                                        <!---->
                                        <div class="modal fade" id="user_add" tabindex="-1"
                                             role="dialog" aria-labelledby="myModalLabel"
                                             aria-hidden="true">
                                            <div class="modal-dialog">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close"
                                                                data-dismiss="modal"
                                                                aria-hidden="true"></button>
                                                        <h4 class="modal-title" id="">
                                                            增加用户
                                                        </h4>
                                                    </div>
                                                    <form action="<?php echo U('Admin/add');?>" method="post">

                                                        <div class="modal-body">
                                                            <div class="panel-body">
                                                                <input class="hidden" type="text" name="add_type" value="user"/>
                                                                <label for="user_add_name">账号名称</label>
                                                                <input class="form-control" type="username" name="username" id="user_add_name"/>
                                                                <br/>
                                                                <label for="user_add_sort">分类</label>
                                                                <select class="form-control" name="user_type" id="user_add_sort">
                                                                    <?php if($user['user_type'] == 'admin'): ?><option name="user_type1" value="user">user</option>
                                                                        <option name="user_type2" selected="selected" value="admin">admin</option>
                                                                        <?php else: ?>
                                                                        <option name="user_type1" selected="selected" value="user">user</option>
                                                                        <option name="user_type2" value="admin">admin</option><?php endif; ?>
                                                                </select>
                                                                <br/>
                                                                <label for="user_add_password">密码</label>
                                                                <input class="form-control" type="password" name="password" id="user_add_password"/>
                                                                <br/>
                                                                <label for="user_add_confirm_password">确认密码</label>
                                                                <input class="form-control" type="password" name="confirm_password" id="user_add_confirm_password"/>
                                                                <br/>
                                                                <label for="user_add_email">邮箱</label>
                                                                <input class="form-control" type="email" name="email" id="user_add_email"/>
                                                            </div>
                                                        </div>
                                                        <div class="modal-footer ">
                                                            <center>
                                                                <button type="submit"
                                                                        class="btn btn-success">提交
                                                                </button>
                                                                <button type="button"
                                                                        class="btn btn-default"
                                                                        data-dismiss="modal">关闭
                                                                </button>
                                                            </center>

                                                        </div>
                                                    </form>
                                                </div>
                                                <!-- /.modal-content -->
                                            </div>
                                            <!-- /.modal -->
                                        </div>
                                        <!---->
                                    </div>
                            </div>
                            <div class="tab-pane" id="panel-09">

                                <div class="panel panel-default">
                                    <!-- Default panel contents -->
                                    <div class="panel-heading"><b>帖子表</b></div>

                                    <!-- Table -->
                                    <table class="table table-bordered" border="" cellspacing="" cellpadding="">
                                        <thead>
                                        <tr class="success">
                                            <td>选择</td>
                                            <td>ID</td>
                                            <td>类型</td>
                                            <td>标题</td>
                                            <td>作者</td>
                                            <td>时间</td>
                                            <td>操作</td>
                                            <td>置顶</td>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php if(is_array($articles)): foreach($articles as $key=>$article): ?><tr>
                                                <td>
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" id="inlineCheckbox1" value="option1">
                                                    </label>
                                                </td>
                                                <td><?php echo ($article['id']); ?></td>
                                                <td><?php echo ($article['sort']); ?></td>
                                                <td><?php echo ($article['title']); ?></td>
                                                <td><?php echo ($article['author']); ?></td>
                                                <td><?php echo ($article['create_time']); ?></td>
                                                <td>
                                                    <button class="btn btn-primary" data-toggle="modal"
                                                            data-target="#article_edit<?php echo ($article['id']); ?>">更改
                                                    </button>
                                                    <!---->
                                                    <div class="modal fade" id="article_edit<?php echo ($article['id']); ?>"
                                                         tabindex="-1"
                                                         role="dialog" aria-labelledby="myModalLabel"
                                                         aria-hidden="true">
                                                        <div class="modal-dialog">
                                                            <div class="modal-content">
                                                                <div class="modal-header">
                                                                    <button type="button" class="close"
                                                                            data-dismiss="modal"
                                                                            aria-hidden="true"></button>
                                                                    <h4 class="modal-title" >
                                                                        更改
                                                                    </h4>
                                                                </div>
                                                                <form action="<?php echo U('Admin/edit');?>" method="post">

                                                                    <div class="modal-body">
                                                                        <div class="panel-body">
                                                                            <input class="hidden" type="text" name="edit_type"
                                                                                   value="article"/>
                                                                            <input class="hidden" type="text" name="id"
                                                                                   value="<?php echo ($article['id']); ?>"/>
                                                                            <label class="control-label" for="title">标题</label>
                                                                            <input class="form-control" type="text" id="title"
                                                                                   name="title"
                                                                                   value="<?php echo ($article['title']); ?>"/>
                                                                            <br/>
                                                                            <label class="control-label" for="sort">分类</label>
                                                                            <select name="sort_id" id="sort" class="form-control">
                                                                                <?php if(is_array($sorts)): foreach($sorts as $key=>$sort): if($sort['name'] == $article['sort']): ?><option class="form-control"  name="sort<?php echo ($sort['id']); ?>" value="<?php echo ($sort['id']); ?>" selected="selected"><?php echo ($sort['name']); ?></option>
                                                                                    <?php else: ?>
                                                                                        <option class="form-control"  name="sort<?php echo ($sort['id']); ?>" value="<?php echo ($sort['id']); ?>"><?php echo ($sort['name']); ?></option><?php endif; endforeach; endif; ?>
                                                                            </select>
                                                                            <br/>
                                                                            <label class="control-label" for="content">内容</label>
                                                                            <textarea class="form-control" id="content"
                                                                                      cols="50"
                                                                                      rows="10" name="content"><?php echo ($article['content']); ?>
                                                                            </textarea>
                                                                        </div>
                                                                    </div>
                                                                    <div class="modal-footer ">
                                                                        <center>
                                                                            <button type="submit"
                                                                                    class="btn btn-success">提交
                                                                            </button>
                                                                            <button type="button"
                                                                                    class="btn btn-default"
                                                                                    data-dismiss="modal">关闭
                                                                            </button>
                                                                        </center>

                                                                    </div>
                                                                </form>
                                                            </div>
                                                            <!-- /.modal-content -->
                                                        </div>
                                                        <!-- /.modal -->
                                                    </div>
                                                    <!---->


                                                    <button class="btn btn-danger" data-toggle="modal"
                                                            data-target="#article_delete<?php echo ($article['id']); ?>">删除
                                                    </button>
                                                    <!---->
                                                    <div class="modal fade" id="article_delete<?php echo ($article['id']); ?>"
                                                         tabindex="-1"
                                                         role="dialog"
                                                         aria-labelledby="" aria-hidden="true">
                                                        <div class="modal-dialog modal-sm">
                                                            <div class="modal-content">
                                                                <div class="modal-header">
                                                                    <button type="button" class="close"
                                                                            data-dismiss="modal"
                                                                            aria-hidden="true"></button>
                                                                    <h4 class="modal-title danger">
                                                                        确认删除？
                                                                    </h4>
                                                                </div>
                                                                <form style="display: inline"
                                                                      action="<?php echo U('Admin/delete');?>"
                                                                      method="post">
                                                                    <div class="modal-body">
                                                                        <input type="hidden"
                                                                               name="delete_type"
                                                                               value="article"/>
                                                                        <input type="hidden"
                                                                               name="id"
                                                                               value="<?php echo ($article['id']); ?>"/>
                                                                        <center>
                                                                            <button type="submit"
                                                                                    class="btn btn-danger">删除
                                                                            </button>
                                                                            <button type="button"
                                                                                    class="btn btn-default"
                                                                                    data-dismiss="modal">取消
                                                                            </button>
                                                                        </center>
                                                                    </div>
                                                                </form>
                                                            </div>
                                                            <!-- /.modal-content -->
                                                        </div>
                                                        <!-- /.modal -->
                                                    </div>
                                                </td>
                                                <td>
                                                    <button class="btn btn-success" data-toggle="modal"
                                                            data-target="">置顶
                                                    </button>
                                                    <button class="btn btn-warning" data-toggle="modal"
                                                            data-target="">取消
                                                    </button>
                                                </td>
                                            </tr><?php endforeach; endif; ?>
                                        </tbody>
                                    </table>

                                </div>
                                <div class="pagination  pagination-centered">
                                    <ul class="pagination">
                                        <li>
                                            <a href="#">上一页</a>
                                        </li>
                                        <li>
                                            <a href="#">1</a>
                                        </li>
                                        <li>
                                            <a href="#">2</a>
                                        </li>
                                        <li>
                                            <a href="#">3</a>
                                        </li>
                                        <li>
                                            <a href="#">下一页</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="col-sm-12">
                                    <button type="submit" class="btn btn-success">批量置顶</button>
                                    <button type="submit" class="btn btn-danger">批量删除</button>
                                </div>
                            </div>
                            <div class="tab-pane" id="panel-10">
                                <!--<form class="form-horizontal" role="form" action="" method="">-->
                                <div class="panel panel-default">
                                    <!-- Default panel contents -->
                                    <div class="panel-heading"><b>分类表</b></div>

                                    <!-- Table -->
                                    <table class="table table-bordered" border="" cellspacing="" cellpadding="">
                                        <thead>
                                        <tr class="success">
                                            <td>ID</td>
                                            <td>分类名</td>
                                            <td>介绍</td>
                                            <td>操作</td>

                                        </tr>
                                        </thead>
                                        <tbody>

                                        <?php if(is_array($sorts)): foreach($sorts as $key=>$sort): ?><tr>
                                                <td><?php echo ($sort['id']); ?></td>
                                                <td><?php echo ($sort['name']); ?></td>
                                                <td><?php echo ($sort['introduction']); ?></td>
                                                <td>
                                                    <button class="btn btn-primary" data-toggle="modal"
                                                            data-target="#sort_update<?php echo ($sort['id']); ?>">更改
                                                    </button>
                                                    <!---->
                                                    <div class="modal fade" id="sort_update<?php echo ($sort['id']); ?>" tabindex="-1"
                                                         role="dialog" aria-labelledby="myModalLabel"
                                                         aria-hidden="true">
                                                        <div class="modal-dialog">
                                                            <div class="modal-content">
                                                                <div class="modal-header">
                                                                    <button type="button" class="close"
                                                                            data-dismiss="modal"
                                                                            aria-hidden="true"></button>
                                                                    <h4 class="modal-title">
                                                                        更改
                                                                    </h4>
                                                                </div>
                                                                <form action="<?php echo U('Admin/edit');?>" method="post">

                                                                    <div class="modal-body">
                                                                        <div class="panel-body">
                                                                            <input class="hidden" type="text" name="edit_type"
                                                                                   value="sort"/>
                                                                            <input class="hidden" type="text" name="id"
                                                                                   value="<?php echo ($sort['id']); ?>"/>
                                                                            <label class="control-label" for="sort_name">分类名</label>
                                                                            <input class="form-control" type="text" id="sort_name"
                                                                                   name="name" value="<?php echo ($sort['name']); ?>"/>
                                                                            <br/>
                                                                            <label class="control-label" for="sort_info">分类介绍</label>
                                                                            <input class="form-control" type="text" id="sort_info"
                                                                                   name="introduction"
                                                                                   value="<?php echo ($sort['introduction']); ?>"/>
                                                                        </div>
                                                                    </div>
                                                                    <div class="modal-footer ">
                                                                        <center>
                                                                            <button type="submit"
                                                                                    class="btn btn-success">提交
                                                                            </button>
                                                                            <button type="button"
                                                                                    class="btn btn-default"
                                                                                    data-dismiss="modal">关闭
                                                                            </button>
                                                                        </center>

                                                                    </div>
                                                                </form>
                                                            </div>
                                                            <!-- /.modal-content -->
                                                        </div>
                                                        <!-- /.modal -->
                                                    </div>
                                                    <!---->


                                                    <button class="btn btn-danger" data-toggle="modal"
                                                            data-target="#sort_delete<?php echo ($sort['id']); ?>">删除
                                                    </button>
                                                    <!---->
                                                    <div class="modal fade" id="sort_delete<?php echo ($sort['id']); ?>"
                                                         tabindex="-1"
                                                         role="dialog"
                                                         aria-labelledby="" aria-hidden="true">
                                                        <div class="modal-dialog modal-sm">
                                                            <div class="modal-content">
                                                                <div class="modal-header">
                                                                    <button type="button" class="close"
                                                                            data-dismiss="modal"
                                                                            aria-hidden="true"></button>
                                                                    <h4 class="modal-title danger">
                                                                        确认删除？
                                                                    </h4>
                                                                </div>
                                                                <form style="display: inline"
                                                                      action="<?php echo U('Admin/delete');?>"
                                                                      method="post">
                                                                    <div class="modal-body">
                                                                        <input type="hidden"
                                                                               name="delete_type"
                                                                               value="sort"/>
                                                                        <input type="hidden"
                                                                               name="id"
                                                                               value="<?php echo ($sort['id']); ?>"/>
                                                                        <center>
                                                                            <button type="submit"
                                                                                    class="btn btn-danger">删除
                                                                            </button>
                                                                            <button type="button"
                                                                                    class="btn btn-default"
                                                                                    data-dismiss="modal">取消
                                                                            </button>
                                                                        </center>
                                                                    </div>
                                                                </form>
                                                            </div>
                                                            <!-- /.modal-content -->
                                                        </div>
                                                        <!-- /.modal -->
                                                    </div>


                                                </td>
                                            </tr><?php endforeach; endif; ?>
                                        </tbody>

                                    </table>

                                </div>
                                <div class="pagination  pagination-centered">
                                    <ul class="pagination">
                                        <li>
                                            <a href="#">上一页</a>
                                        </li>
                                        <li>
                                            <a href="#">1</a>
                                        </li>
                                        <li>
                                            <a href="#">2</a>
                                        </li>
                                        <li>
                                            <a href="#">3</a>
                                        </li>
                                        <li>
                                            <a href="#">下一页</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="col-sm-12">
                                    <button class="btn btn-primary" data-toggle="modal"
                                            data-target="#sort_add">增加
                                    </button>
                                    <!---->
                                    <div class="modal fade" id="sort_add" tabindex="-1"
                                         role="dialog" aria-labelledby="myModalLabel"
                                         aria-hidden="true">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close"
                                                            data-dismiss="modal"
                                                            aria-hidden="true"></button>
                                                    <h4 class="modal-title" id="myModalLabel">
                                                        增加分类
                                                    </h4>
                                                </div>
                                                <form action="<?php echo U('Admin/add');?>" method="post">

                                                    <div class="modal-body">
                                                        <div class="panel-body">
                                                            <input class="hidden" type="text" name="add_type"
                                                                   value="sort"/>
                                                            <label class="control-label" for="sort_add_name">分类名称</label>
                                                            <input class="form-control" type="text" name="name" id="sort_add_name"/>
                                                            <br/>
                                                            <label class="control-label" for="sort_add_info">分类介绍</label>
                                                            <input class="form-control" type="text" name="introduction" id="sort_add_info"/>
                                                        </div>
                                                    </div>
                                                    <div class="modal-footer ">
                                                        <center>
                                                            <button type="submit"
                                                                    class="btn btn-success">提交
                                                            </button>
                                                            <button type="button"
                                                                    class="btn btn-default"
                                                                    data-dismiss="modal">关闭
                                                            </button>
                                                        </center>

                                                    </div>
                                                </form>
                                            </div>
                                            <!-- /.modal-content -->
                                        </div>
                                        <!-- /.modal -->
                                    </div>
                                    <!---->
                                </div>
                                <!--</form>-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <!---->
</div>
<!---->

<footer id="footer">
    <div class="container">
        <p>Powered by BBS 2016-2017 Allright rights reserved</p>
    </div>
</footer>
<!---->
<script src="/tp/Public/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script src="/tp/Public/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</body>

</html>